<%--

<!--------------------------------------------------------------------------------------------------------------------------------
 - Copyright 2007 CORE Solutions Limited
 - All rights reserved.
 - PROPRIETARY AND CONFIDENTIAL INFORMATION.
 - Use is subject to license terms.
 -
 - FUNCTION ID      :   COUNTRY
 - AUTHOR           :   Craig Chun 
 - DATE CREATE      :   2007/07/12
 - DESCRIPTION      :   a CHILD TAB JSP file for the function, COUNTRY
 -                  :   
 -                  :   
 -                  :   
 -
 - MODIFICATION HISTORY:
 - DATE         AUTHOR          VERSION NO.         COMMENT
 - -----------  --------------  ------------------  -------------------
 - 2007/07/12   Craig Chun      1.0                 source is generated.
 -
 -
 -
--------------------------------------------------------------------------------------------------------------------------------->

--%>
<%@ include file="/jsp/com/erp/app/common/jsp/directives_include.jsp"%>

<%@ page import="com.erp.app.setup.country.vo.CountryPortVo"%>
<%@ page import="com.erp.app.setup.country.web.CountryMaintenanceAction"%>
<%@ page import="com.erp.app.setup.country.web.CountryMaintenanceForm"%>
<%@ page import="com.erp.app.setup.country.web.CountryPortRow"%>

<%@ include file="/jsp/com/erp/app/common/jsp/html_include.jsp"%>

<jsp:useBean id="countryMaintenanceForm" scope="session" type="com.erp.app.setup.country.web.CountryMaintenanceForm" />

<%
ArrayList countryPortList = countryMaintenanceForm.getMultiRows(CountryMaintenanceAction.TAB_IDX_PORT);
pageContext.setAttribute("countryPortList", countryPortList);

rowReadOnly = false;
%>

<div class="footerbuttons"><chtml:button form="countryMaintenanceForm" pageEvent="<%=CountryMaintenanceAction.ACTION_ADD_PORT%>" styleClass="button1" />

</div><%
TableSchema[] childTsArray = countryMaintenanceForm.getChildTs();
TableSchema childTs = childTsArray[CountryMaintenanceAction.TAB_IDX_PORT];
%>

<table class="table_grid">

	<tr class="grid_header">
		<%
			webLabel = childTs.getDisplayWebLabelByObjectId("LBL_PORT_DELETE");
		%>
		<td class="grid_header_col_narrow" nowrap>
			<%=webLabel%>
		</td>
		<td class="grid_header_col" nowrap>
			<html:text useExtensions="true" uiType="label" name="countryMaintenanceForm" childTsIndex="current" property="portCode"/>
		</td>
			<td class="grid_header_col" nowrap>
			<html:text useExtensions="true" uiType="label" name="countryMaintenanceForm" childTsIndex="current" property="portStatus"/>
		</td>
		<td class="grid_header_col" nowrap>
			<html:text useExtensions="true" uiType="label" name="countryMaintenanceForm" childTsIndex="current" property="portPortName"/>
		</td>
		<td class="grid_header_col" nowrap>
			<html:text useExtensions="true" uiType="label" name="countryMaintenanceForm" childTsIndex="current" property="portIsoPortCode"/>
		</td>
		<td class="grid_header_col" nowrap>
			<html:text useExtensions="true" uiType="label" name="countryMaintenanceForm" childTsIndex="current" property="portPortAbbr"/>
		</td>
		<td class="grid_header_col" nowrap>
			<html:text useExtensions="true" uiType="label" name="countryMaintenanceForm" childTsIndex="current" property="portPortType"/>
		</td>
		<td class="grid_header_col" nowrap>
			<html:text useExtensions="true" uiType="label" name="countryMaintenanceForm" childTsIndex="current" property="portSeq"/>
		</td>
	</tr>

	<logic:iterate id="countryPortRow" name="countryPortList" indexId="idx" >

	<%
		CountryPortRow row = (CountryPortRow) countryPortRow;
		boolean isDelete = !CommonUtil.isEmpty(row.getIsDelete());
		rowReadOnly = isDelete;
	%>

	<tr <%=(idx.intValue()%2 == 0)? "class='grid_result1'": "class='grid_result2'"%>>
		<td nowrap>
			<chtml:button form="countryMaintenanceForm" deleteButton="true" multiRow="countryPortRow" pageEvent="<%=CountryMaintenanceAction.ACTION_DEL_PORT%>" pageEventSrc="<%=String.valueOf(idx)%>" styleClass="button1" disabled="<%=String.valueOf(rowReadOnly)%>"/>
		</td>
		<td nowrap>
			<html:text useExtensions="true" uiType="text" name="countryPortRow" property="portCode" readonly="<%=rowReadOnly%>" />
		</td>
		<td nowrap>
			<html:text useExtensions="true" uiType="combobox"  showCode="false" showDescription="true" name="countryPortRow" property="portStatus" readonly="<%=rowReadOnly%>" />		</td>
		<td nowrap>
			<html:text useExtensions="true" uiType="textarea" name="countryPortRow" styleClass="textarea1" property="portPortName" styleClass="textbox1" readonly="<%=rowReadOnly%>"/>		</td>
		<td nowrap>
			<html:text useExtensions="true" uiType="combobox" showCode="false" showDescription="true" name="countryPortRow" property="portIsoPortCode" readonly="<%=rowReadOnly%>" />		</td>
		<td nowrap>
			<html:text useExtensions="true" uiType="text" name="countryPortRow" property="portPortAbbr" styleClass="textbox1" readonly="<%=rowReadOnly%>"/>		</td>
		<td nowrap>
			<html:text useExtensions="true" uiType="combobox" name="countryPortRow" property="portPortType" readonly="<%=rowReadOnly%>" />		</td>
		<td nowrap>
			<html:text useExtensions="true" uiType="text" name="countryPortRow" property="portSeq" readonly="<%=rowReadOnly%>" />		</td>
	</tr>

		<html:hidden property="idx" value="<%=row.getIdx()%>" />
		<html:hidden property="rowMode"  value="<%=row.getRowMode()%>"/>

	</logic:iterate>

</table>

<div class="headerbuttons"><chtml:button form="countryMaintenanceForm" pageEvent="<%=CountryMaintenanceAction.ACTION_ADD_PORT%>" styleClass="button1" />

</div>